{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "4e14ef4c098022de",
   "metadata": {
    "ExecuteTime": {
     "start_time": "2024-05-15T04:22:18.877925Z"
    },
    "collapsed": false,
    "jupyter": {
     "outputs_hidden": false
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Requirement already satisfied: agency-swarm in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (0.2.2)\n",
      "Requirement already satisfied: selenium in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (4.20.0)\n",
      "Requirement already satisfied: webdriver-manager in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (4.0.1)\n",
      "Requirement already satisfied: selenium_stealth in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (1.0.6)\n",
      "Requirement already satisfied: gradio in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (4.21.0)\n",
      "Requirement already satisfied: openai==1.27.0 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from agency-swarm) (1.27.0)\n",
      "Requirement already satisfied: instructor==1.2.6 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from agency-swarm) (1.2.6)\n",
      "Requirement already satisfied: deepdiff==6.7.1 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from agency-swarm) (6.7.1)\n",
      "Requirement already satisfied: termcolor==2.3.0 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from agency-swarm) (2.3.0)\n",
      "Requirement already satisfied: python-dotenv==1.0.0 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from agency-swarm) (1.0.0)\n",
      "Requirement already satisfied: rich==13.7.0 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from agency-swarm) (13.7.0)\n",
      "Requirement already satisfied: jsonref==1.1.0 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from agency-swarm) (1.1.0)\n",
      "Requirement already satisfied: ordered-set<4.2.0,>=4.0.2 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from deepdiff==6.7.1->agency-swarm) (4.1.0)\n",
      "Requirement already satisfied: aiohttp<4.0.0,>=3.9.1 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from instructor==1.2.6->agency-swarm) (3.9.3)\n",
      "Requirement already satisfied: docstring-parser<0.17,>=0.16 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from instructor==1.2.6->agency-swarm) (0.16)\n",
      "Requirement already satisfied: pydantic<3.0.0,>=2.7.0 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from instructor==1.2.6->agency-swarm) (2.7.0)\n",
      "Requirement already satisfied: pydantic-core<3.0.0,>=2.18.0 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from instructor==1.2.6->agency-swarm) (2.18.1)\n",
      "Requirement already satisfied: tenacity<9.0.0,>=8.2.3 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from instructor==1.2.6->agency-swarm) (8.2.3)\n",
      "Requirement already satisfied: typer<1.0.0,>=0.9.0 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from instructor==1.2.6->agency-swarm) (0.9.0)\n",
      "Requirement already satisfied: anyio<5,>=3.5.0 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from openai==1.27.0->agency-swarm) (3.7.1)\n",
      "Requirement already satisfied: distro<2,>=1.7.0 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from openai==1.27.0->agency-swarm) (1.9.0)\n",
      "Requirement already satisfied: httpx<1,>=0.23.0 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from openai==1.27.0->agency-swarm) (0.26.0)\n",
      "Requirement already satisfied: sniffio in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from openai==1.27.0->agency-swarm) (1.3.0)\n",
      "Requirement already satisfied: tqdm>4 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from openai==1.27.0->agency-swarm) (4.66.2)\n",
      "Requirement already satisfied: typing-extensions<5,>=4.7 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from openai==1.27.0->agency-swarm) (4.9.0)\n",
      "Requirement already satisfied: markdown-it-py>=2.2.0 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from rich==13.7.0->agency-swarm) (3.0.0)\n",
      "Requirement already satisfied: pygments<3.0.0,>=2.13.0 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from rich==13.7.0->agency-swarm) (2.15.1)\n",
      "Requirement already satisfied: urllib3<3,>=1.26 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from urllib3[socks]<3,>=1.26->selenium) (2.1.0)\n",
      "Requirement already satisfied: trio~=0.17 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from selenium) (0.25.0)\n",
      "Requirement already satisfied: trio-websocket~=0.9 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from selenium) (0.11.1)\n",
      "Requirement already satisfied: certifi>=2021.10.8 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from selenium) (2024.2.2)\n",
      "Requirement already satisfied: requests in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from webdriver-manager) (2.31.0)\n",
      "Requirement already satisfied: packaging in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from webdriver-manager) (23.2)\n",
      "Requirement already satisfied: aiofiles<24.0,>=22.0 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from gradio) (23.2.1)\n",
      "Requirement already satisfied: altair<6.0,>=4.2.0 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from gradio) (5.2.0)\n",
      "Requirement already satisfied: fastapi in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from gradio) (0.110.0)\n",
      "Requirement already satisfied: ffmpy in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from gradio) (0.3.2)\n",
      "Requirement already satisfied: gradio-client==0.12.0 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from gradio) (0.12.0)\n",
      "Requirement already satisfied: huggingface-hub>=0.19.3 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from gradio) (0.21.4)\n",
      "Requirement already satisfied: importlib-resources<7.0,>=1.3 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from gradio) (6.3.1)\n",
      "Requirement already satisfied: jinja2<4.0 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from gradio) (3.1.3)\n",
      "Requirement already satisfied: markupsafe~=2.0 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from gradio) (2.1.3)\n",
      "Requirement already satisfied: matplotlib~=3.0 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from gradio) (3.8.3)\n",
      "Requirement already satisfied: numpy~=1.0 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from gradio) (1.26.4)\n",
      "Requirement already satisfied: orjson~=3.0 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from gradio) (3.9.10)\n",
      "Requirement already satisfied: pandas<3.0,>=1.0 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from gradio) (2.2.1)\n",
      "Requirement already satisfied: pillow<11.0,>=8.0 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from gradio) (10.2.0)\n",
      "Requirement already satisfied: pydub in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from gradio) (0.25.1)\n",
      "Requirement already satisfied: python-multipart>=0.0.9 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from gradio) (0.0.9)\n",
      "Requirement already satisfied: pyyaml<7.0,>=5.0 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from gradio) (6.0.1)\n",
      "Requirement already satisfied: ruff>=0.2.2 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from gradio) (0.3.3)\n",
      "Requirement already satisfied: semantic-version~=2.0 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from gradio) (2.10.0)\n",
      "Requirement already satisfied: tomlkit==0.12.0 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from gradio) (0.12.0)\n",
      "Requirement already satisfied: uvicorn>=0.14.0 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from gradio) (0.28.0)\n",
      "Requirement already satisfied: fsspec in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from gradio-client==0.12.0->gradio) (2024.3.1)\n",
      "Requirement already satisfied: websockets<12.0,>=10.0 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from gradio-client==0.12.0->gradio) (11.0.3)\n",
      "Requirement already satisfied: jsonschema>=3.0 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from altair<6.0,>=4.2.0->gradio) (4.19.2)\n",
      "Requirement already satisfied: toolz in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from altair<6.0,>=4.2.0->gradio) (0.12.1)\n",
      "Requirement already satisfied: httpcore==1.* in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from httpx<1,>=0.23.0->openai==1.27.0->agency-swarm) (1.0.4)\n",
      "Requirement already satisfied: idna in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from httpx<1,>=0.23.0->openai==1.27.0->agency-swarm) (3.4)\n",
      "Requirement already satisfied: h11<0.15,>=0.13 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from httpcore==1.*->httpx<1,>=0.23.0->openai==1.27.0->agency-swarm) (0.14.0)\n",
      "Requirement already satisfied: filelock in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from huggingface-hub>=0.19.3->gradio) (3.13.1)\n",
      "Requirement already satisfied: contourpy>=1.0.1 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from matplotlib~=3.0->gradio) (1.2.0)\n",
      "Requirement already satisfied: cycler>=0.10 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from matplotlib~=3.0->gradio) (0.12.1)\n",
      "Requirement already satisfied: fonttools>=4.22.0 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from matplotlib~=3.0->gradio) (4.50.0)\n",
      "Requirement already satisfied: kiwisolver>=1.3.1 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from matplotlib~=3.0->gradio) (1.4.5)\n",
      "Requirement already satisfied: pyparsing>=2.3.1 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from matplotlib~=3.0->gradio) (3.1.2)\n",
      "Requirement already satisfied: python-dateutil>=2.7 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from matplotlib~=3.0->gradio) (2.8.2)\n",
      "Requirement already satisfied: pytz>=2020.1 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from pandas<3.0,>=1.0->gradio) (2023.3.post1)\n",
      "Requirement already satisfied: tzdata>=2022.7 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from pandas<3.0,>=1.0->gradio) (2024.1)\n",
      "Requirement already satisfied: annotated-types>=0.4.0 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from pydantic<3.0.0,>=2.7.0->instructor==1.2.6->agency-swarm) (0.6.0)\n",
      "Requirement already satisfied: attrs>=23.2.0 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from trio~=0.17->selenium) (23.2.0)\n",
      "Requirement already satisfied: sortedcontainers in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from trio~=0.17->selenium) (2.4.0)\n",
      "Requirement already satisfied: outcome in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from trio~=0.17->selenium) (1.3.0.post0)\n",
      "Requirement already satisfied: exceptiongroup in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from trio~=0.17->selenium) (1.2.0)\n",
      "Requirement already satisfied: wsproto>=0.14 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from trio-websocket~=0.9->selenium) (1.2.0)\n",
      "Requirement already satisfied: click<9.0.0,>=7.1.1 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from typer<1.0.0,>=0.9.0->instructor==1.2.6->agency-swarm) (8.1.7)\n",
      "Requirement already satisfied: colorama<0.5.0,>=0.4.3 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from typer[all]<1.0,>=0.9->gradio) (0.4.6)\n",
      "Requirement already satisfied: shellingham<2.0.0,>=1.3.0 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from typer[all]<1.0,>=0.9->gradio) (1.5.4)\n",
      "Requirement already satisfied: pysocks!=1.5.7,<2.0,>=1.5.6 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from urllib3[socks]<3,>=1.26->selenium) (1.7.1)\n",
      "Requirement already satisfied: starlette<0.37.0,>=0.36.3 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from fastapi->gradio) (0.36.3)\n",
      "Requirement already satisfied: charset-normalizer<4,>=2 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from requests->webdriver-manager) (2.0.4)\n",
      "Requirement already satisfied: aiosignal>=1.1.2 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from aiohttp<4.0.0,>=3.9.1->instructor==1.2.6->agency-swarm) (1.3.1)\n",
      "Requirement already satisfied: frozenlist>=1.1.1 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from aiohttp<4.0.0,>=3.9.1->instructor==1.2.6->agency-swarm) (1.4.1)\n",
      "Requirement already satisfied: multidict<7.0,>=4.5 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from aiohttp<4.0.0,>=3.9.1->instructor==1.2.6->agency-swarm) (6.0.5)\n",
      "Requirement already satisfied: yarl<2.0,>=1.0 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from aiohttp<4.0.0,>=3.9.1->instructor==1.2.6->agency-swarm) (1.9.4)\n",
      "Requirement already satisfied: async-timeout<5.0,>=4.0 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from aiohttp<4.0.0,>=3.9.1->instructor==1.2.6->agency-swarm) (4.0.3)\n",
      "Requirement already satisfied: jsonschema-specifications>=2023.03.6 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio) (2023.12.1)\n",
      "Requirement already satisfied: referencing>=0.28.4 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio) (0.33.0)\n",
      "Requirement already satisfied: rpds-py>=0.7.1 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio) (0.10.6)\n",
      "Requirement already satisfied: mdurl~=0.1 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from markdown-it-py>=2.2.0->rich==13.7.0->agency-swarm) (0.1.2)\n",
      "Requirement already satisfied: six>=1.5 in /Users/vrsen/anaconda3/envs/agency-swarm/lib/python3.10/site-packages (from python-dateutil>=2.7->matplotlib~=3.0->gradio) (1.16.0)\n"
     ]
    }
   ],
   "source": [
    "!pip install agency-swarm selenium webdriver-manager selenium_stealth gradio"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "936f950c-5d30-4985-b5c2-6a4e26d82a8a",
   "metadata": {
    "collapsed": false,
    "jupyter": {
     "outputs_hidden": false
    }
   },
   "source": [
    "# Basic Single Browsing Agent\n",
    "\n",
    "**If you get an error, please quit chrome and re-run the cell.**\n",
    "\n",
    "Also, make sure to reload the notebook or close demo each time you run it."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "6fb55459",
   "metadata": {},
   "outputs": [],
   "source": [
    "import sys\n",
    "sys.path.insert(0, '../')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "fef70033",
   "metadata": {},
   "outputs": [],
   "source": [
    "# don't run this cell if you have already set the key in environment variables\n",
    "from agency_swarm import set_openai_key\n",
    "set_openai_key(\"YOUR_OPENAI_API_KEY\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "d0586b684514e713",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-05-15T06:47:49.107691Z",
     "start_time": "2024-05-15T06:47:45.358107Z"
    },
    "collapsed": false,
    "jupyter": {
     "outputs_hidden": false
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Files folder '/Users/vrsen/Projects/agency-swarm/agency-swarm/agency_swarm/agents/BrowsingAgent/files' is not a directory. Skipping...\n",
      "Schemas folder path is not a directory. Skipping...  /Users/vrsen/Projects/agency-swarm/agency-swarm/agency_swarm/agents/BrowsingAgent/schemas\n",
      "Updating assistant... BrowsingAgent\n",
      "Running on local URL:  http://127.0.0.1:7861\n",
      "IMPORTANT: You are using gradio version 4.21.0, however version 4.29.0 is available, please upgrade.\n",
      "--------\n",
      "\n",
      "To create a public link, set `share=True` in `launch()`.\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div><iframe src=\"http://127.0.0.1:7861/\" width=\"100%\" height=\"500\" allow=\"autoplay; camera; microphone; clipboard-read; clipboard-write;\" frameborder=\"0\" allowfullscreen></iframe></div>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "from agency_swarm.agents import BrowsingAgent, Devid\n",
    "from agency_swarm import Agency, Agent\n",
    "\n",
    "selenium_config = {\n",
    "    # your profile path\n",
    "    # \"chrome_profile_path\": \"/Users/vrsen/Library/Application Support/Google/Chrome Canary/Profile 1\",\n",
    "    \"headless\": False,\n",
    "    \"full_page_screenshot\": False,\n",
    "}\n",
    "\n",
    "browsing_agent = BrowsingAgent(selenium_config=selenium_config)\n",
    "\n",
    "agency = Agency([browsing_agent])\n",
    "\n",
    "demo = agency.demo_gradio(height=700) # reload the notebook each time you run this cell"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "6decc2caf79dc22d",
   "metadata": {
    "collapsed": false,
    "jupyter": {
     "outputs_hidden": false
    }
   },
   "outputs": [],
   "source": [
    "demo.close()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "adf41fcb-64d4-4759-9c10-a6504c0ff001",
   "metadata": {
    "collapsed": false,
    "jupyter": {
     "outputs_hidden": false
    }
   },
   "source": [
    "# Creating Your Own Browsing Swarm\n",
    "In this example, we'll simply add a manager agent with some additional instructions so he can tell the browsing agent what to do next."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "5b6cf1fa",
   "metadata": {},
   "outputs": [],
   "source": [
    "import sys\n",
    "sys.path.insert(0, '../')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "2d92de1f",
   "metadata": {},
   "outputs": [],
   "source": [
    "# don't run this cell if you have already set the key in environment variables\n",
    "from agency_swarm import set_openai_key\n",
    "set_openai_key(\"YOUR_OPENAI_API_KEY\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "a6eca041305cce5a",
   "metadata": {
    "collapsed": false,
    "jupyter": {
     "outputs_hidden": false
    }
   },
   "outputs": [],
   "source": [
    "from agency_swarm.agents import BrowsingAgent\n",
    "from agency_swarm import Agency, Agent"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "55d911e7d32a509c",
   "metadata": {
    "collapsed": false,
    "jupyter": {
     "outputs_hidden": false
    }
   },
   "outputs": [],
   "source": [
    "report_manager = Agent(name=\"Report Manager\",\n",
    "            description=\"The Report Manager Agent is responsible for supervising data collection from various weather websites and compiling reports as necessary.\",\n",
    "            instructions=\"As a Report Manager Agent, your role involves direct interaction and oversight of the BrowsingAgent's operations. Your primary duty is to guarantee that the user's task is comprehensively and accurately completed. Achieve this by methodically breaking down each task from the user into smaller steps required to complete it. Then, issue each step of the task as a distinct message to the BrowsingAgent. Make sure to always tell the browsing agent to go back to google search results before proceeding to the the next source. After the necessary data is collection, compile a report and send it to the user. Make sure to ask the browsing agent for direct links to the sources and include them into report. Try to trouble shoot any issues that may arise along the way with the other agents first, before reporting back to the user. Do not respond to the user until the report is complete or you have encountered an issue that you cannot resolve yourself.\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "2215c629454380d1",
   "metadata": {
    "collapsed": false,
    "jupyter": {
     "outputs_hidden": false
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Files folder '/Users/vrsen/Projects/agency-swarm/agency-swarm/agency_swarm/agents/BrowsingAgent/files' is not a directory. Skipping...\n",
      "Schemas folder path is not a directory. Skipping...  /Users/vrsen/Projects/agency-swarm/agency-swarm/agency_swarm/agents/BrowsingAgent/schemas\n"
     ]
    }
   ],
   "source": [
    "selenium_config = {\n",
    "    # your profile path\n",
    "    # \"chrome_profile_path\": \"/Users/vrsen/Library/Application Support/Google/Chrome/Profile 1\",\n",
    "    \"headless\": False,\n",
    "    \"full_page_screenshot\": False,\n",
    "}\n",
    "\n",
    "browsing_agent = BrowsingAgent(selenium_config=selenium_config)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "6fcafb1fdf523943",
   "metadata": {
    "collapsed": false,
    "jupyter": {
     "outputs_hidden": false
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Updating assistant... Report Manager\n",
      "Updating assistant... BrowsingAgent\n"
     ]
    }
   ],
   "source": [
    "agency = Agency([report_manager,\n",
    "                 [report_manager, browsing_agent]],\n",
    "                shared_instructions=\"You are a part of a data collection agency with the goal to find the most relevant information about people on the web. Your core value is autonomy and you are free to use any means necessary to achieve your goal. You do not stop until you have found the information you need or you have exhausted all possible means. You always to to compile a comprehensive report with as much information from the web pages as possible.\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "5cbf60b8-6d09-4995-aa29-3f6a89e13778",
   "metadata": {
    "collapsed": false,
    "jupyter": {
     "outputs_hidden": false
    }
   },
   "source": [
    "Reload the notebook each time you run the cell below"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "6e622ad186d4fef8",
   "metadata": {
    "collapsed": false,
    "jupyter": {
     "outputs_hidden": false
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Running on local URL:  http://127.0.0.1:7860\n",
      "IMPORTANT: You are using gradio version 4.21.0, however version 4.29.0 is available, please upgrade.\n",
      "--------\n",
      "\n",
      "To create a public link, set `share=True` in `launch()`.\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div><iframe src=\"http://127.0.0.1:7860/\" width=\"100%\" height=\"500\" allow=\"autoplay; camera; microphone; clipboard-read; clipboard-write;\" frameborder=\"0\" allowfullscreen></iframe></div>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Message files:  []\n",
      "THREAD:[ user -> Report Manager ]: URL https://platform.openai.com/playground/assistants?assistant=asst_HRMYJ9tA8t6SszeUEuCEGGf3&mode=assistant&thread=thread_Gn13VtIwN5UuddUiKyygG7pT\n",
      "THREAD:[ Report Manager -> BrowsingAgent ]: URL https://platform.openai.com/playground/assistants?assistant=asst_NDddvs0pmyGfwNAAjn6Cx7vj&mode=assistant&thread=thread_wzOAoIbsqcyCvI04WJ5I77A1\n",
      "Initializing WebDriver...\n",
      "Selenium imported successfully.\n",
      "webdriver_manager imported successfully.\n",
      "selenium_stealth imported successfully.\n",
      "ChromeOptions initialized.\n",
      "ChromeDriver not found at /usr/bin/chromedriver. Installing using webdriver_manager.\n",
      "Window size set to 1920,1080.\n",
      "Chrome options configured.\n",
      "WebDriver initialized successfully.\n",
      "Profile path in use: /var/folders/y3/_zvpts1x6_5gsh98xj0xp2rc0000gn/T/.org.chromium.Chromium.Q3mfXq\n",
      "Stealth mode configured.\n",
      "Implicit wait set to 3 seconds.\n",
      "Initializing WebDriver...\n",
      "Selenium imported successfully.\n",
      "webdriver_manager imported successfully.\n",
      "selenium_stealth imported successfully.\n",
      "Returning existing WebDriver instance.\n",
      "Initializing WebDriver...\n",
      "Selenium imported successfully.\n",
      "webdriver_manager imported successfully.\n",
      "selenium_stealth imported successfully.\n",
      "Returning existing WebDriver instance.\n",
      "Initializing WebDriver...\n",
      "Selenium imported successfully.\n",
      "webdriver_manager imported successfully.\n",
      "selenium_stealth imported successfully.\n",
      "Returning existing WebDriver instance.\n",
      "Initializing WebDriver...\n",
      "Selenium imported successfully.\n",
      "webdriver_manager imported successfully.\n",
      "selenium_stealth imported successfully.\n",
      "Returning existing WebDriver instance.\n",
      "Initializing WebDriver...\n",
      "Selenium imported successfully.\n",
      "webdriver_manager imported successfully.\n",
      "selenium_stealth imported successfully.\n",
      "Returning existing WebDriver instance.\n",
      "Initializing WebDriver...\n",
      "Selenium imported successfully.\n",
      "webdriver_manager imported successfully.\n",
      "selenium_stealth imported successfully.\n",
      "Returning existing WebDriver instance.\n",
      "Initializing WebDriver...\n",
      "Selenium imported successfully.\n",
      "webdriver_manager imported successfully.\n",
      "selenium_stealth imported successfully.\n",
      "Returning existing WebDriver instance.\n",
      "Initializing WebDriver...\n",
      "Selenium imported successfully.\n",
      "webdriver_manager imported successfully.\n",
      "selenium_stealth imported successfully.\n",
      "Returning existing WebDriver instance.\n",
      "Message files:  []\n",
      "THREAD:[ user -> Report Manager ]: URL https://platform.openai.com/playground/assistants?assistant=asst_HRMYJ9tA8t6SszeUEuCEGGf3&mode=assistant&thread=thread_Gn13VtIwN5UuddUiKyygG7pT\n",
      "Message files:  []\n",
      "THREAD:[ user -> Report Manager ]: URL https://platform.openai.com/playground/assistants?assistant=asst_HRMYJ9tA8t6SszeUEuCEGGf3&mode=assistant&thread=thread_Gn13VtIwN5UuddUiKyygG7pT\n",
      "Message files:  []\n",
      "THREAD:[ user -> Report Manager ]: URL https://platform.openai.com/playground/assistants?assistant=asst_HRMYJ9tA8t6SszeUEuCEGGf3&mode=assistant&thread=thread_Gn13VtIwN5UuddUiKyygG7pT\n",
      "Message files:  []\n",
      "THREAD:[ user -> Report Manager ]: URL https://platform.openai.com/playground/assistants?assistant=asst_HRMYJ9tA8t6SszeUEuCEGGf3&mode=assistant&thread=thread_Gn13VtIwN5UuddUiKyygG7pT\n",
      "Message files:  []\n",
      "THREAD:[ user -> Report Manager ]: URL https://platform.openai.com/playground/assistants?assistant=asst_HRMYJ9tA8t6SszeUEuCEGGf3&mode=assistant&thread=thread_Gn13VtIwN5UuddUiKyygG7pT\n",
      "Message files:  []\n",
      "THREAD:[ user -> Report Manager ]: URL https://platform.openai.com/playground/assistants?assistant=asst_HRMYJ9tA8t6SszeUEuCEGGf3&mode=assistant&thread=thread_Gn13VtIwN5UuddUiKyygG7pT\n",
      "Message files:  []\n",
      "THREAD:[ user -> Report Manager ]: URL https://platform.openai.com/playground/assistants?assistant=asst_HRMYJ9tA8t6SszeUEuCEGGf3&mode=assistant&thread=thread_Gn13VtIwN5UuddUiKyygG7pT\n",
      "Message files:  []\n",
      "THREAD:[ user -> Report Manager ]: URL https://platform.openai.com/playground/assistants?assistant=asst_HRMYJ9tA8t6SszeUEuCEGGf3&mode=assistant&thread=thread_Gn13VtIwN5UuddUiKyygG7pT\n",
      "THREAD:[ Report Manager -> BrowsingAgent ]: URL https://platform.openai.com/playground/assistants?assistant=asst_NDddvs0pmyGfwNAAjn6Cx7vj&mode=assistant&thread=thread_wzOAoIbsqcyCvI04WJ5I77A1\n",
      "Initializing WebDriver...\n",
      "Selenium imported successfully.\n",
      "webdriver_manager imported successfully.\n",
      "selenium_stealth imported successfully.\n",
      "Returning existing WebDriver instance.\n",
      "Initializing WebDriver...\n",
      "Selenium imported successfully.\n",
      "webdriver_manager imported successfully.\n",
      "selenium_stealth imported successfully.\n",
      "Returning existing WebDriver instance.\n",
      "Initializing WebDriver...\n",
      "Selenium imported successfully.\n",
      "webdriver_manager imported successfully.\n",
      "selenium_stealth imported successfully.\n",
      "Returning existing WebDriver instance.\n",
      "Initializing WebDriver...\n",
      "Selenium imported successfully.\n",
      "webdriver_manager imported successfully.\n",
      "selenium_stealth imported successfully.\n",
      "Returning existing WebDriver instance.\n",
      "Initializing WebDriver...\n",
      "Selenium imported successfully.\n",
      "webdriver_manager imported successfully.\n",
      "selenium_stealth imported successfully.\n",
      "Returning existing WebDriver instance.\n",
      "Initializing WebDriver...\n",
      "Selenium imported successfully.\n",
      "webdriver_manager imported successfully.\n",
      "selenium_stealth imported successfully.\n",
      "Returning existing WebDriver instance.\n",
      "Initializing WebDriver...\n",
      "Selenium imported successfully.\n",
      "webdriver_manager imported successfully.\n",
      "selenium_stealth imported successfully.\n",
      "Returning existing WebDriver instance.\n",
      "Initializing WebDriver...\n",
      "Selenium imported successfully.\n",
      "webdriver_manager imported successfully.\n",
      "selenium_stealth imported successfully.\n",
      "Returning existing WebDriver instance.\n",
      "Initializing WebDriver...\n",
      "Selenium imported successfully.\n",
      "webdriver_manager imported successfully.\n",
      "selenium_stealth imported successfully.\n",
      "Returning existing WebDriver instance.\n",
      "THREAD:[ Report Manager -> BrowsingAgent ]: URL https://platform.openai.com/playground/assistants?assistant=asst_NDddvs0pmyGfwNAAjn6Cx7vj&mode=assistant&thread=thread_wzOAoIbsqcyCvI04WJ5I77A1\n",
      "Initializing WebDriver...\n",
      "Selenium imported successfully.\n",
      "webdriver_manager imported successfully.\n",
      "selenium_stealth imported successfully.\n",
      "Returning existing WebDriver instance.\n",
      "Initializing WebDriver...\n",
      "Selenium imported successfully.\n",
      "webdriver_manager imported successfully.\n",
      "selenium_stealth imported successfully.\n",
      "Returning existing WebDriver instance.\n",
      "Initializing WebDriver...\n",
      "Selenium imported successfully.\n",
      "webdriver_manager imported successfully.\n",
      "selenium_stealth imported successfully.\n",
      "Returning existing WebDriver instance.\n",
      "Initializing WebDriver...\n",
      "Selenium imported successfully.\n",
      "webdriver_manager imported successfully.\n",
      "selenium_stealth imported successfully.\n",
      "Returning existing WebDriver instance.\n",
      "Initializing WebDriver...\n",
      "Selenium imported successfully.\n",
      "webdriver_manager imported successfully.\n",
      "selenium_stealth imported successfully.\n",
      "Returning existing WebDriver instance.\n",
      "Initializing WebDriver...\n",
      "Selenium imported successfully.\n",
      "webdriver_manager imported successfully.\n",
      "selenium_stealth imported successfully.\n",
      "Returning existing WebDriver instance.\n",
      "Message files:  []\n",
      "THREAD:[ user -> Report Manager ]: URL https://platform.openai.com/playground/assistants?assistant=asst_HRMYJ9tA8t6SszeUEuCEGGf3&mode=assistant&thread=thread_Gn13VtIwN5UuddUiKyygG7pT\n",
      "THREAD:[ Report Manager -> BrowsingAgent ]: URL https://platform.openai.com/playground/assistants?assistant=asst_NDddvs0pmyGfwNAAjn6Cx7vj&mode=assistant&thread=thread_wzOAoIbsqcyCvI04WJ5I77A1\n",
      "Initializing WebDriver...\n",
      "Selenium imported successfully.\n",
      "webdriver_manager imported successfully.\n",
      "selenium_stealth imported successfully.\n",
      "Returning existing WebDriver instance.\n",
      "Initializing WebDriver...\n",
      "Selenium imported successfully.\n",
      "webdriver_manager imported successfully.\n",
      "selenium_stealth imported successfully.\n",
      "Returning existing WebDriver instance.\n",
      "Initializing WebDriver...\n",
      "Selenium imported successfully.\n",
      "webdriver_manager imported successfully.\n",
      "selenium_stealth imported successfully.\n",
      "Returning existing WebDriver instance.\n",
      "Message files:  []\n",
      "THREAD:[ user -> Report Manager ]: URL https://platform.openai.com/playground/assistants?assistant=asst_HRMYJ9tA8t6SszeUEuCEGGf3&mode=assistant&thread=thread_Gn13VtIwN5UuddUiKyygG7pT\n",
      "THREAD:[ Report Manager -> BrowsingAgent ]: URL https://platform.openai.com/playground/assistants?assistant=asst_NDddvs0pmyGfwNAAjn6Cx7vj&mode=assistant&thread=thread_wzOAoIbsqcyCvI04WJ5I77A1\n",
      "Initializing WebDriver...\n",
      "Selenium imported successfully.\n",
      "webdriver_manager imported successfully.\n",
      "selenium_stealth imported successfully.\n",
      "Returning existing WebDriver instance.\n",
      "Initializing WebDriver...\n",
      "Selenium imported successfully.\n",
      "webdriver_manager imported successfully.\n",
      "selenium_stealth imported successfully.\n",
      "Returning existing WebDriver instance.\n",
      "Initializing WebDriver...\n",
      "Selenium imported successfully.\n",
      "webdriver_manager imported successfully.\n",
      "selenium_stealth imported successfully.\n",
      "Returning existing WebDriver instance.\n",
      "Initializing WebDriver...\n",
      "Selenium imported successfully.\n",
      "webdriver_manager imported successfully.\n",
      "selenium_stealth imported successfully.\n",
      "Returning existing WebDriver instance.\n",
      "Initializing WebDriver...\n",
      "Selenium imported successfully.\n",
      "webdriver_manager imported successfully.\n",
      "selenium_stealth imported successfully.\n",
      "Returning existing WebDriver instance.\n"
     ]
    }
   ],
   "source": [
    "demo = agency.demo_gradio(height=700)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "44024be8-679f-485d-8f67-cfa753e1cbe7",
   "metadata": {
    "collapsed": false,
    "jupyter": {
     "outputs_hidden": false
    }
   },
   "source": [
    "Compile a report on Arsenii Shatokhin from the top 3 sources on google"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "25ce5ab2798e019b",
   "metadata": {
    "collapsed": false,
    "jupyter": {
     "outputs_hidden": false
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Closing server running on port: 7860\n"
     ]
    }
   ],
   "source": [
    "demo.close()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "92390579-db54-4bdc-99ca-ea7bb88738ec",
   "metadata": {
    "collapsed": false,
    "jupyter": {
     "outputs_hidden": false
    }
   },
   "source": [
    "Here are the instructions:\n",
    "1. Tell browsing agent to to https://www.youtube.com/results?search_query=ai+channels&sp=EgIQAg%253D%253D, which is a search results page for all channels on ai\n",
    "2. Click on channel link\n",
    "3. Click on more link near the channel description\n",
    "4. Check if channel has email address.\n",
    "5. If it doesn't, go back to step 2 and repeat for top 5 channels\n",
    "4. If it does, Click on view email address\n",
    "5. Solve captcha if required \n",
    "6. Copy email \n",
    "7. Repeat from step 1 for top 5 channels\n",
    "8. Send emails back to me"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "ef1ce88d-cb60-47de-b9e5-d7abd231b0f5",
   "metadata": {
    "collapsed": false,
    "jupyter": {
     "outputs_hidden": false
    }
   },
   "source": [
    "# Breaking Captchas\n",
    "You can run this example with no additional configuration.\n",
    "\n",
    "However, to add your own cookies, go to `chrome://version/` Then copy Profile path folder and paste it into Chrome Canary installation folder. You might also need to login with google first time the browser window opens. Don't forget to allow less secure apps: https://support.google.com/accounts/answer/6010255?hl=en"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "328d59e8",
   "metadata": {},
   "outputs": [],
   "source": [
    "import sys\n",
    "sys.path.insert(0, '../')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "97376adcafed4820",
   "metadata": {
    "collapsed": false,
    "jupyter": {
     "outputs_hidden": false
    }
   },
   "outputs": [],
   "source": [
    "# don't run this cell if you have already set the key in environment variables\n",
    "from agency_swarm import set_openai_key\n",
    "set_openai_key(\"YOUR_OPENAI_API_KEY\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "86e2966a4afe3a89",
   "metadata": {
    "collapsed": false,
    "jupyter": {
     "outputs_hidden": false
    }
   },
   "outputs": [],
   "source": [
    "from agency_swarm.agents import BrowsingAgent\n",
    "from agency_swarm import Agency"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "10b3ec1a2bd49658",
   "metadata": {
    "collapsed": false,
    "jupyter": {
     "outputs_hidden": false
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Files folder '/Users/vrsen/Projects/agency-swarm/agency-swarm/agency_swarm/agents/BrowsingAgent/files' is not a directory. Skipping...\n",
      "Schemas folder path is not a directory. Skipping...  /Users/vrsen/Projects/agency-swarm/agency-swarm/agency_swarm/agents/BrowsingAgent/schemas\n"
     ]
    }
   ],
   "source": [
    "browsing_agent = BrowsingAgent(selenium_config={\n",
    "    #\"chrome_profile_path\": \"/Users/vrsen/Library/Application Support/Google/Chrome Canary/Profile 5\", # path to your canary chrome profile\n",
    "    \"headless\": False, # set to True if you don't want to see the browser\n",
    "})"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "5f343de7bd09c6db",
   "metadata": {
    "collapsed": false,
    "jupyter": {
     "outputs_hidden": false
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Updating assistant... BrowsingAgent\n"
     ]
    }
   ],
   "source": [
    "agency = Agency([browsing_agent],shared_instructions=\"\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "b5efce7f-e4e0-4360-b56f-d69e2f6a1efe",
   "metadata": {
    "collapsed": false,
    "jupyter": {
     "outputs_hidden": false
    }
   },
   "source": [
    "### Task Instructions:\n",
    "\n",
    "Go to https://www.google.com/recaptcha/api2/demo and use solve captcha tool"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "db538b4b13cdff38",
   "metadata": {
    "collapsed": false,
    "jupyter": {
     "outputs_hidden": false
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Running on local URL:  http://127.0.0.1:7860\n",
      "IMPORTANT: You are using gradio version 4.21.0, however version 4.29.0 is available, please upgrade.\n",
      "--------\n",
      "\n",
      "To create a public link, set `share=True` in `launch()`.\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div><iframe src=\"http://127.0.0.1:7860/\" width=\"100%\" height=\"500\" allow=\"autoplay; camera; microphone; clipboard-read; clipboard-write;\" frameborder=\"0\" allowfullscreen></iframe></div>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "Gradio Blocks instance: 6 backend functions\n",
       "-------------------------------------------\n",
       "fn_index=0\n",
       " inputs:\n",
       " |-textbox\n",
       " |-chatbot\n",
       " outputs:\n",
       " |-textbox\n",
       " |-chatbot\n",
       "fn_index=1\n",
       " inputs:\n",
       " |-textbox\n",
       " |-chatbot\n",
       " outputs:\n",
       " |-textbox\n",
       " |-chatbot\n",
       "fn_index=2\n",
       " inputs:\n",
       " |-dropdown\n",
       " outputs:\n",
       "fn_index=3\n",
       " inputs:\n",
       " |-file\n",
       " outputs:\n",
       "fn_index=4\n",
       " inputs:\n",
       " |-textbox\n",
       " |-chatbot\n",
       " outputs:\n",
       " |-textbox\n",
       " |-chatbot\n",
       "fn_index=5\n",
       " inputs:\n",
       " |-textbox\n",
       " |-chatbot\n",
       " outputs:\n",
       " |-textbox\n",
       " |-chatbot"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Reload the notebook each time you run this cell \n",
    "# Additionally, do not change browser window size, or it will not work\n",
    "agency.demo_gradio(height=600)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "73139479",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.13"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
